<? 

    if(!file_exists('subheader.php'))
        include('includes/subheader.php');

    if(!file_exists('createtrump.php'))
        include('includes/createtrump.php');
   
?>

<script type="text/javascript">

        // Post Trump cardto wall
        function PostTrumpCardToWall()
        {
            alert("Post Trump Card to your wall");
            
            <?php

                $image = "http://vishaknag.com/fbapp/assets/images/trumpCards/".$user."_trumpCard.png";

                // Do the wall post.
                $facebook->api("/$user/feed", "post", array(
                    message => 'My Trumpter card',
                    picture => $image,
                    link => $facebook_canvas_location,
                    name => 'TRUMPSTERS',
                    caption => 'Game ON'
                ));

            ?>
        }
    
    </script>
    
<div class="topDiv">                    

    <div>   
        <img src="<?= $trump_assets_url ?>images/gameBacks/<?= $user ?>_gameBack.png"/> 
    </div>
    
    <div class="card">
        <img src="<?= $trump_assets_url ?>images/trumpCards/<?= $user ?>_trumpCard.png"/> 
    </div>
    
    <div class="postToWallButton" onclick="PostTrumpCardToWall()">
        <img src="<?= $trump_assets_url ?>images/buttons/wall.jpg"/>
    </div>    
    
</div>  